package com.heima.wemedia.controller.v1;

import com.heima.apis.wemedia.LoginControllerApi;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmUserDto;
import com.heima.wemedia.service.WmUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Jt
 * @date 2021/4/14 10:24
 */
@RestController
@RequestMapping("/login")
public class LoginController implements LoginControllerApi {

    @Resource
    private WmUserService wmUserService;

    @PostMapping("/in")
    @Override
    public ResponseResult login(@RequestBody WmUserDto wmUserDto) {

        return wmUserService.login(wmUserDto);
    }

}
